home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 June / 1984-06.d64 / word scramble_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  75 lines

  1. 1 poke53280,6:poke53281,1
  2. 5 sn=54272
  3. 6 pokesn+24,15:pokesn+5,17:pokesn+6,240:pokesn,100
  4. 10 print"[147]":print"word scramble"
  5. 20 gosub1000:print"[147]"
  6. 25 print"each player takes a turn entering a     common ";
  7. 30 print"word (a maximum of 10 letters)."
  8. 35 print"the computer will then scramble the word";
  9. 40 print"and print it."
  10. 45 print"you have three minutes to find it."
  11. 50 print"if found within the allotted time, you"
  12. 55 print"will be given 50 points."
  13. 60 print"for every wrong guess that you make, youwill lose 10 points."
  14. 65 print"[156]press space bar when ready[146]"
  15. 70 ifpeek(197)<>60then70
  16. 75 poke198,0
  17. 80 print"[147]player # 1's name":inputp$(0)
  18. 85 print"[156]player # 2's name":inputp$(1)
  19. 90 print"";p$(c);" enter word to be scrambled:[146]"
  20. 92 w$="":inputw$:ifw$=""thenprint"[145]";:goto92
  21. 95 iflen(w$)>10thenprint"no more then 10 letters[146]":goto90
  22. 100 gosub200
  23. 110 gosub300
  24. 120 t(c)=t(c)+s(c)
  25. 130 gosub400:fori=1to10:b$(i)="":next
  26. 140 goto90
  27. 200 fori=1tolen(w$)
  28. 210 a$(i)=mid$(w$,i,1)
  29. 220 next
  30. 230 c$="":fori=1tolen(w$)
  31. 240 r=int(rnd(1)*len(w$)+1)
  32. 250 ifb$(r)<>""then240
  33. 260 b$(r)=a$(i)
  34. 270 next
  35. 271 fori=1tolen(w$):c$=c$+b$(i):next
  36. 272 ifc$=w$andlen(w$)<>1thenfori=1tolen(w$):b$(i)="":next:goto230
  37. 275 print"[147]        word has been scrambled.[146]"
  38. 280 poke 198,0:print"       press space bar when ready"
  39. 285 ifpeek(197)<>60then285
  40. 290 print"[147]";
  41. 295 fori=1tolen(w$):print"";b$(i);:next
  42. 298 poke198,0:return
  43. 300 x=95:s(c)=50
  44. 310 ti$="000000"
  45. 320 print:print:print:print
  46. 325 sc=1399:cc=sc+54272
  47. 330 fori=1tolen(w$)
  48. 335 pokesc,99:pokecc,2
  49. 340 getc$
  50. 350 print""mid$(ti$,4,1)" [146]minutes  "right$(ti$,2)" [146]seconds"
  51. 355 ifti$="000300"thengosub500:goto390
  52. 360 ifc$=""then340
  53. 365 print""
  54. 370 ifc$=a$(i)thenprinttab(x)a$(i);:by=50:ln=50:gosub600:goto380
  55. 375 ifs(c)<10thengosub550:goto390
  56. 378 ifc$<>a$(i)thens(c)=s(c)-10:by=20:ln=120:gosub600:goto335
  57. 380 x=x+1:sc=sc+1:cc=cc+1:next
  58. 390 return
  59. 400 ifc<>1thenc=1:return
  60. 410 print"[147]scores[146]"
  61. 420 print"[163][163][163][163][163][163]"
  62. 430 print""p$(0);tab(25);p$(1)
  63. 440 print""t(1);tab(24);t(0)
  64. 450 c=0:return
  65. 500 print"[147]your time is up[146]"
  66. 510 print"word was "w$".":s(c)=0
  67. 520 fort=1to5000:next:return
  68. 550 print"you ran out of points[146]"
  69. 560 print"[156]word was "w$"."
  70. 570 fort=1to2000:next
  71. 580 return
  72. 600 pokesn+1,by:pokesn+4,33:forqq=1toln:next:pokesn+4,32:return
  73. 1000 forby=50to20step-1:ln=20:gosub600:next:fori=1to500:next
  74. 1010 return
  75.